#ifndef _MYSQL_DB_QUERY_GET_ERROR_4_MODULE_H_
#define _MYSQL_DB_QUERY_GET_ERROR_4_MODULE_H_

#include "databasequery.h"
#include "queryeclistresult.h"
#include "errorcode.h"
#include "databasemngr.h"
#include "module.h"

#include <list>

namespace mysqlquery
{

enum etype
{
  ETYPE_ERROR_ID = 0,
  ETYPE_MODULE_ID,
  ETYPE_ERROR_SHRT_DESCR,
  ETYPE_ERROR_FULL_DESCR,
  ETYPE_ERROR_MODULE_NAME,
  ETYPE_MAX
};

class dbquerygeterror : public errorcodelistresult, public DatabaseQuery
{
  protected:
    dbquerygeterror();
    virtual ~dbquerygeterror();
  public:
    virtual std::list<Errorcode> getErrorList(ListQVariant lv);
};

class dbq_geterror4module : public dbquerygeterror
{

public:
   dbq_geterror4module(Module m = Module(ALL_MODULE_ID));
   dbq_geterror4module(std::list<Module> m_list);
   virtual ~dbq_geterror4module();

   void setModule(std::list<Module> m_list);
   void setModule(Module module);


   virtual QSqlQuery getSqlQuery();

protected:
   std::list<Module> module_list;

};

} // namespace mysqlquery

#endif // _MYSQL_DB_QUERY_GET_ERROR_4_MODULE_H_


